﻿using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using UFIDA.U9.WSS.ProxyService.Models;
using UFIDA.U9.WSS.SystemService.Models;

namespace UFIDA.U9.WSS.SystemService.Interfaces
{
    [ServiceContract]
    internal interface ISystemService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        ReturnMessage<bool> TestConnection();

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        ReturnMessage<List<EnterpriseData>> GetEnterprises();

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        ReturnMessage<List<LanguageData>> GetLanguages(string enterpriseID);

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.WrappedRequest)]
        ReturnMessage<List<OrgData>> GetOrgsByUserCode(string enterpriseID, string userCode, string culture);

        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Bare)]
        ReturnMessage<bool> Login(ContextInfo context);
    }
}